<?php
require_once 'Sabai/Token.php';

class Sabai_Template_Default_Helper_Token extends Sabai_Template_Default_Helper
{
    function execute($tokenID, $queryStyle= false, $tokenSalt = SABAI_TOKEN_SALT)
    {
        $token =& Sabai_Token::create($tokenID);
        $token->salt($tokenSalt);
        if ($queryStyle) {
            return SABAI_TOKEN_NAME . '=' . $token->getValue();
        }
        return $token->getValue();
    }
}